<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>shark::Energy&lt; RBM &gt; Struct Template Reference</title>
<script type="text/javaScript" src="search/search.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3.0.1/es5/tex-mml-chtml.js"></script>
<script src="../../mlstyle.js"></script>
<link href="../css/besser.css" rel="stylesheet" type="text/css"/>
</head>
<!-- pretty cool: each body gets an id tag which is the basename of the web page  -->
<!--              and allows for page-specific CSS. this is client-side scripted, -->
<!--              so the id will not yet show up in the served source code -->
<script type="text/javascript">
    jQuery(document).ready(function () {
        var url = jQuery(location).attr('href');
        var pname = url.substr(url.lastIndexOf("/")+1, url.lastIndexOf(".")-url.lastIndexOf("/")-1);
        jQuery('#this_url').html('<strong>' + pname + '</strong>');
        jQuery('body').attr('id', pname);
    });
</script>
<body>
    <div id="shark_old">
        <div id="wrap">
            <div id="header">
                <div id="site-name"><a href="../../sphinx_pages/build/html/index.html">Shark machine learning library</a></div>
                <ul id="nav">
                    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/installation.html">Installation</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/tutorials/tutorials.html">Tutorials</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/benchmark.html">Benchmarks</a>
                    </li>
                    <li class="active">
                        <a href="classes.html">Documentation</a>
                        <ul>
                            <li class="first"></li>
                            <li><a href="../../sphinx_pages/build/html/rest_sources/quickref/quickref.html">Quick references</a></li>
                            <li><a href="classes.html">Class list</a></li>
                            <li class="last"><a href="group__shark__globals.html">Global functions</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </div>
<div id="doxywrapper">
<!--
    <div id="global_doxytitle">Doxygen<br>Documentation:</div>
-->
    <div id="navrow_wrapper">
<!-- Generated by Doxygen 1.9.8 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceshark.html">shark</a></li><li class="navelem"><a class="el" href="structshark_1_1_energy.html">Energy</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="structshark_1_1_energy-members.html">List of all members</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle"><div class="title">shark::Energy&lt; RBM &gt; Struct Template Reference</div></div>
</div><!--header-->
<div class="contents">

<p>The <a class="el" href="structshark_1_1_energy.html" title="The Energy function determining the Gibbs distribution of an RBM.">Energy</a> function determining the Gibbs distribution of an <a class="el" href="classshark_1_1_r_b_m.html" title="stub for the RBM class. at the moment it is just a holder of the parameter set and the Energy.">RBM</a>.  
 <a href="structshark_1_1_energy.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_energy_8h_source.html">shark/Unsupervised/RBM/Energy.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:aff1c0d419e5e79be2221262c2321a7c8" id="r_aff1c0d419e5e79be2221262c2321a7c8"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classshark_1_1_r_b_m.html#a1b20cbe042d3ac817fbf26c562e5b277">RBM::HiddenType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structshark_1_1_energy.html#aff1c0d419e5e79be2221262c2321a7c8">HiddenType</a></td></tr>
<tr class="separator:aff1c0d419e5e79be2221262c2321a7c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab71e2d1ae4d13995eaccf3b4992f3593" id="r_ab71e2d1ae4d13995eaccf3b4992f3593"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classshark_1_1_r_b_m.html#a5e271a43da1f3c33db74235402d7a84b">RBM::VisibleType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structshark_1_1_energy.html#ab71e2d1ae4d13995eaccf3b4992f3593">VisibleType</a></td></tr>
<tr class="separator:ab71e2d1ae4d13995eaccf3b4992f3593"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d806deb535c0978328154e4436bab50" id="r_a5d806deb535c0978328154e4436bab50"><td class="memItemLeft" align="right" valign="top">typedef HiddenType::SufficientStatistics&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structshark_1_1_energy.html#a5d806deb535c0978328154e4436bab50">HiddenStatistics</a></td></tr>
<tr class="separator:a5d806deb535c0978328154e4436bab50"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27298f912ce91884f0d4b26832f971b6" id="r_a27298f912ce91884f0d4b26832f971b6"><td class="memItemLeft" align="right" valign="top">typedef VisibleType::SufficientStatistics&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structshark_1_1_energy.html#a27298f912ce91884f0d4b26832f971b6">VisibleStatistics</a></td></tr>
<tr class="separator:a27298f912ce91884f0d4b26832f971b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb7c41575f52f5cfa9ac63161fc54c93" id="r_adb7c41575f52f5cfa9ac63161fc54c93"><td class="memItemLeft" align="right" valign="top">typedef HiddenType::StatisticsBatch&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structshark_1_1_energy.html#adb7c41575f52f5cfa9ac63161fc54c93">HiddenStatisticsBatch</a></td></tr>
<tr class="separator:adb7c41575f52f5cfa9ac63161fc54c93"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8b34b676d95d754b53ce625e587b9250" id="r_a8b34b676d95d754b53ce625e587b9250"><td class="memItemLeft" align="right" valign="top">typedef VisibleType::StatisticsBatch&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structshark_1_1_energy.html#a8b34b676d95d754b53ce625e587b9250">VisibleStatisticsBatch</a></td></tr>
<tr class="separator:a8b34b676d95d754b53ce625e587b9250"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a18af216e713128efcd3b7dbfbd38ec5d" id="r_a18af216e713128efcd3b7dbfbd38ec5d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structshark_1_1_energy.html#a18af216e713128efcd3b7dbfbd38ec5d">Energy</a> (<a class="el" href="classshark_1_1_r_b_m.html">RBM</a> const &amp;rbm)</td></tr>
<tr class="separator:a18af216e713128efcd3b7dbfbd38ec5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa07edf12f92820285d1b51495cdafb35" id="r_aa07edf12f92820285d1b51495cdafb35"><td class="memItemLeft" align="right" valign="top">RealVector&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structshark_1_1_energy.html#aa07edf12f92820285d1b51495cdafb35">energy</a> (RealMatrix const &amp;hidden, RealMatrix const &amp;visible) const</td></tr>
<tr class="memdesc:aa07edf12f92820285d1b51495cdafb35"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates the <a class="el" href="structshark_1_1_energy.html" title="The Energy function determining the Gibbs distribution of an RBM.">Energy</a> given the states of batches of hidden and visible variables .  <br /></td></tr>
<tr class="separator:aa07edf12f92820285d1b51495cdafb35"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a751c81c6de87a9d563d36db38edccb92" id="r_a751c81c6de87a9d563d36db38edccb92"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structshark_1_1_energy.html#a751c81c6de87a9d563d36db38edccb92">inputHidden</a> (RealMatrix &amp;inputs, RealMatrix const &amp;visibleStates) const</td></tr>
<tr class="memdesc:a751c81c6de87a9d563d36db38edccb92"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates the input of the hidden neurons given the state of the visible in a batch-vise fassion.  <br /></td></tr>
<tr class="separator:a751c81c6de87a9d563d36db38edccb92"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acf73968e06c43cedaf8fede5b2bf7782" id="r_acf73968e06c43cedaf8fede5b2bf7782"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structshark_1_1_energy.html#acf73968e06c43cedaf8fede5b2bf7782">inputVisible</a> (RealMatrix &amp;inputs, RealMatrix const &amp;hiddenStates) const</td></tr>
<tr class="memdesc:acf73968e06c43cedaf8fede5b2bf7782"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates the input of the visible neurons given the state of the hidden.  <br /></td></tr>
<tr class="separator:acf73968e06c43cedaf8fede5b2bf7782"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afa5365f469f52d0682d3820fb071fa1b" id="r_afa5365f469f52d0682d3820fb071fa1b"><td class="memTemplParams" colspan="2">template&lt;class BetaVector &gt; </td></tr>
<tr class="memitem:afa5365f469f52d0682d3820fb071fa1b"><td class="memTemplItemLeft" align="right" valign="top">RealVector&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structshark_1_1_energy.html#afa5365f469f52d0682d3820fb071fa1b">logUnnormalizedProbabilityHidden</a> (RealMatrix const &amp;hiddenState, RealMatrix const &amp;visibleInput, BetaVector const &amp;beta) const</td></tr>
<tr class="memdesc:afa5365f469f52d0682d3820fb071fa1b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes the logarithm of the unnormalized probability of each state of the hidden neurons in a batch by using the precomputed input/activation of the visible neurons.  <br /></td></tr>
<tr class="separator:afa5365f469f52d0682d3820fb071fa1b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7d21da0cfe60fabb495a5fa0d75cce51" id="r_a7d21da0cfe60fabb495a5fa0d75cce51"><td class="memTemplParams" colspan="2">template&lt;class BetaVector &gt; </td></tr>
<tr class="memitem:a7d21da0cfe60fabb495a5fa0d75cce51"><td class="memTemplItemLeft" align="right" valign="top">RealVector&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structshark_1_1_energy.html#a7d21da0cfe60fabb495a5fa0d75cce51">logUnnormalizedProbabilityVisible</a> (RealMatrix const &amp;visibleState, RealMatrix const &amp;hiddenInput, BetaVector const &amp;beta) const</td></tr>
<tr class="memdesc:a7d21da0cfe60fabb495a5fa0d75cce51"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes the logarithm of the unnormalized probability of each state of the visible neurons in a batch by using the precomputed input/activation of the hidden neurons.  <br /></td></tr>
<tr class="separator:a7d21da0cfe60fabb495a5fa0d75cce51"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7c5d47f64f1839574b55545cebdbea78" id="r_a7c5d47f64f1839574b55545cebdbea78"><td class="memTemplParams" colspan="2">template&lt;class BetaVector &gt; </td></tr>
<tr class="memitem:a7c5d47f64f1839574b55545cebdbea78"><td class="memTemplItemLeft" align="right" valign="top">RealVector&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structshark_1_1_energy.html#a7c5d47f64f1839574b55545cebdbea78">logUnnormalizedProbabilityVisible</a> (RealMatrix const &amp;visibleStates, BetaVector const &amp;beta) const</td></tr>
<tr class="memdesc:a7c5d47f64f1839574b55545cebdbea78"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes the logarithm of the unnormalized probability for each state of the visible neurons from a batch.  <br /></td></tr>
<tr class="separator:a7c5d47f64f1839574b55545cebdbea78"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e25296fca0f1f23803bbb1535ff8f96" id="r_a3e25296fca0f1f23803bbb1535ff8f96"><td class="memTemplParams" colspan="2">template&lt;class BetaVector &gt; </td></tr>
<tr class="memitem:a3e25296fca0f1f23803bbb1535ff8f96"><td class="memTemplItemLeft" align="right" valign="top">RealVector&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structshark_1_1_energy.html#a3e25296fca0f1f23803bbb1535ff8f96">logUnnormalizedProbabilityHidden</a> (RealMatrix const &amp;hiddenStates, BetaVector const &amp;beta) const</td></tr>
<tr class="memdesc:a3e25296fca0f1f23803bbb1535ff8f96"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes the logarithm of the unnormalized probability of each state of the hidden neurons from a batch.  <br /></td></tr>
<tr class="separator:a3e25296fca0f1f23803bbb1535ff8f96"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a25ad87baa9a3500ea7b3af9a4effc933" id="r_a25ad87baa9a3500ea7b3af9a4effc933"><td class="memItemLeft" align="right" valign="top">RealVector&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structshark_1_1_energy.html#a25ad87baa9a3500ea7b3af9a4effc933">energyFromHiddenInput</a> (RealMatrix const &amp;hiddenInput, RealMatrix const &amp;hidden, RealMatrix const &amp;visible) const</td></tr>
<tr class="memdesc:a25ad87baa9a3500ea7b3af9a4effc933"><td class="mdescLeft">&#160;</td><td class="mdescRight">Optimization of the calculation of the energy, when the input of the hidden units is already available.  <br /></td></tr>
<tr class="separator:a25ad87baa9a3500ea7b3af9a4effc933"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f124cd4e0a4efa781ab34ab246fca81" id="r_a9f124cd4e0a4efa781ab34ab246fca81"><td class="memItemLeft" align="right" valign="top">RealVector&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structshark_1_1_energy.html#a9f124cd4e0a4efa781ab34ab246fca81">energyFromVisibleInput</a> (RealMatrix const &amp;visibleInput, RealMatrix const &amp;hidden, RealMatrix const &amp;visible) const</td></tr>
<tr class="memdesc:a9f124cd4e0a4efa781ab34ab246fca81"><td class="mdescLeft">&#160;</td><td class="mdescRight">Optimization of the calculation of the energy, when the input of the visible units is already available.  <br /></td></tr>
<tr class="separator:a9f124cd4e0a4efa781ab34ab246fca81"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><div class="compoundTemplParams">template&lt;class <a class="el" href="classshark_1_1_r_b_m.html">RBM</a>&gt;<br />
struct shark::Energy&lt; RBM &gt;</div><p>The <a class="el" href="structshark_1_1_energy.html" title="The Energy function determining the Gibbs distribution of an RBM.">Energy</a> function determining the Gibbs distribution of an <a class="el" href="classshark_1_1_r_b_m.html" title="stub for the RBM class. at the moment it is just a holder of the parameter set and the Energy.">RBM</a>. </p>
<p><a class="el" href="namespace_general.html">General</a> <a class="el" href="structshark_1_1_energy.html" title="The Energy function determining the Gibbs distribution of an RBM.">Energy</a> function which uses the information given by the neurons to automatize the calculation of the value of the energy for certain states, the derivative of the energy and the factorization of the probability.</p>
<p>Following (but slightly simplifying from the formulas given by) Welling at al. a general form of an <a class="el" href="classshark_1_1_r_b_m.html" title="stub for the RBM class. at the moment it is just a holder of the parameter set and the Energy.">RBM</a>'s <a class="el" href="structshark_1_1_energy.html" title="The Energy function determining the Gibbs distribution of an RBM.">Energy</a> function is given by \( E(\vec v,\vec h)=  f_h(\vec h) + f_v(\vec v) +  \sum_{k,l} \phi_{hk}(\vec h) W_{k,l} \phi_{vl}(\vec v) \) We call \( f_h(\vec h) \) and \( f_v(\vec v) \) the term of the <a class="el" href="structshark_1_1_energy.html" title="The Energy function determining the Gibbs distribution of an RBM.">Energy</a> (energy term) associated to the hidden or the visible neurons respectively. \(  \sum_{k,l} \phi_{hk}(\vec h) W_{k,l} \phi_{vl}(\vec v) \) is called the interaction term. In the standard case of an binary <a class="el" href="classshark_1_1_r_b_m.html" title="stub for the RBM class. at the moment it is just a holder of the parameter set and the Energy.">RBM</a> we have \( f_h(\vec h) = \vec h  \vec c \) and \( f_v(\vec v) = \vec v \vec b \), where \( \vec c \) and \( \vec b \) are the vectors of the bias parameters for the hidden and the visible neurons respectively. Furthermore, the interaction term simplifies to \( \vec h W \vec v \), so we have just one singe 'phi-function' for each layer that is the identity function. <br  />
 </p>

<p class="definition">Definition at line <a class="el" href="_energy_8h_source.html#l00057">57</a> of file <a class="el" href="_energy_8h_source.html">Energy.h</a>.</p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="a5d806deb535c0978328154e4436bab50" name="a5d806deb535c0978328154e4436bab50"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5d806deb535c0978328154e4436bab50">&#9670;&#160;</a></span>HiddenStatistics</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_r_b_m.html">RBM</a> &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef HiddenType::SufficientStatistics <a class="el" href="structshark_1_1_energy.html">shark::Energy</a>&lt; <a class="el" href="classshark_1_1_r_b_m.html">RBM</a> &gt;::HiddenStatistics</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_energy_8h_source.html#l00062">62</a> of file <a class="el" href="_energy_8h_source.html">Energy.h</a>.</p>

</div>
</div>
<a id="adb7c41575f52f5cfa9ac63161fc54c93" name="adb7c41575f52f5cfa9ac63161fc54c93"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adb7c41575f52f5cfa9ac63161fc54c93">&#9670;&#160;</a></span>HiddenStatisticsBatch</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_r_b_m.html">RBM</a> &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef HiddenType::StatisticsBatch <a class="el" href="structshark_1_1_energy.html">shark::Energy</a>&lt; <a class="el" href="classshark_1_1_r_b_m.html">RBM</a> &gt;::HiddenStatisticsBatch</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_energy_8h_source.html#l00066">66</a> of file <a class="el" href="_energy_8h_source.html">Energy.h</a>.</p>

</div>
</div>
<a id="aff1c0d419e5e79be2221262c2321a7c8" name="aff1c0d419e5e79be2221262c2321a7c8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aff1c0d419e5e79be2221262c2321a7c8">&#9670;&#160;</a></span>HiddenType</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_r_b_m.html">RBM</a> &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="classshark_1_1_r_b_m.html#a1b20cbe042d3ac817fbf26c562e5b277">RBM::HiddenType</a> <a class="el" href="structshark_1_1_energy.html">shark::Energy</a>&lt; <a class="el" href="classshark_1_1_r_b_m.html">RBM</a> &gt;::HiddenType</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_energy_8h_source.html#l00058">58</a> of file <a class="el" href="_energy_8h_source.html">Energy.h</a>.</p>

</div>
</div>
<a id="a27298f912ce91884f0d4b26832f971b6" name="a27298f912ce91884f0d4b26832f971b6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a27298f912ce91884f0d4b26832f971b6">&#9670;&#160;</a></span>VisibleStatistics</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_r_b_m.html">RBM</a> &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef VisibleType::SufficientStatistics <a class="el" href="structshark_1_1_energy.html">shark::Energy</a>&lt; <a class="el" href="classshark_1_1_r_b_m.html">RBM</a> &gt;::VisibleStatistics</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_energy_8h_source.html#l00063">63</a> of file <a class="el" href="_energy_8h_source.html">Energy.h</a>.</p>

</div>
</div>
<a id="a8b34b676d95d754b53ce625e587b9250" name="a8b34b676d95d754b53ce625e587b9250"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8b34b676d95d754b53ce625e587b9250">&#9670;&#160;</a></span>VisibleStatisticsBatch</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_r_b_m.html">RBM</a> &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef VisibleType::StatisticsBatch <a class="el" href="structshark_1_1_energy.html">shark::Energy</a>&lt; <a class="el" href="classshark_1_1_r_b_m.html">RBM</a> &gt;::VisibleStatisticsBatch</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_energy_8h_source.html#l00067">67</a> of file <a class="el" href="_energy_8h_source.html">Energy.h</a>.</p>

</div>
</div>
<a id="ab71e2d1ae4d13995eaccf3b4992f3593" name="ab71e2d1ae4d13995eaccf3b4992f3593"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab71e2d1ae4d13995eaccf3b4992f3593">&#9670;&#160;</a></span>VisibleType</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_r_b_m.html">RBM</a> &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="classshark_1_1_r_b_m.html#a5e271a43da1f3c33db74235402d7a84b">RBM::VisibleType</a> <a class="el" href="structshark_1_1_energy.html">shark::Energy</a>&lt; <a class="el" href="classshark_1_1_r_b_m.html">RBM</a> &gt;::VisibleType</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_energy_8h_source.html#l00059">59</a> of file <a class="el" href="_energy_8h_source.html">Energy.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a18af216e713128efcd3b7dbfbd38ec5d" name="a18af216e713128efcd3b7dbfbd38ec5d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a18af216e713128efcd3b7dbfbd38ec5d">&#9670;&#160;</a></span>Energy()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_r_b_m.html">RBM</a> &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structshark_1_1_energy.html">shark::Energy</a>&lt; <a class="el" href="classshark_1_1_r_b_m.html">RBM</a> &gt;::Energy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classshark_1_1_r_b_m.html">RBM</a> const &amp;&#160;</td>
          <td class="paramname"><em>rbm</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_energy_8h_source.html#l00069">69</a> of file <a class="el" href="_energy_8h_source.html">Energy.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="aa07edf12f92820285d1b51495cdafb35" name="aa07edf12f92820285d1b51495cdafb35"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa07edf12f92820285d1b51495cdafb35">&#9670;&#160;</a></span>energy()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_r_b_m.html">RBM</a> &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">RealVector <a class="el" href="structshark_1_1_energy.html">shark::Energy</a>&lt; <a class="el" href="classshark_1_1_r_b_m.html">RBM</a> &gt;::energy </td>
          <td>(</td>
          <td class="paramtype">RealMatrix const &amp;&#160;</td>
          <td class="paramname"><em>hidden</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">RealMatrix const &amp;&#160;</td>
          <td class="paramname"><em>visible</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Calculates the <a class="el" href="structshark_1_1_energy.html" title="The Energy function determining the Gibbs distribution of an RBM.">Energy</a> given the states of batches of hidden and visible variables . </p>

<p class="definition">Definition at line <a class="el" href="_energy_8h_source.html#l00075">75</a> of file <a class="el" href="_energy_8h_source.html">Energy.h</a>.</p>

<p class="reference">References <a class="el" href="namespaceshark.html#af2ab10364feb8a631e0866dcf2f1a4ad">shark::batchSize()</a>, <a class="el" href="structshark_1_1_energy.html#a25ad87baa9a3500ea7b3af9a4effc933">shark::Energy&lt; RBM &gt;::energyFromHiddenInput()</a>, <a class="el" href="structshark_1_1_energy.html#a751c81c6de87a9d563d36db38edccb92">shark::Energy&lt; RBM &gt;::inputHidden()</a>, and <a class="el" href="_exception_8h.html#a42a6a50e4d06c00d60fbca5333f40768">SIZE_CHECK</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_energy_storing_tempered_markov_chain.html#a390d4deeed260f32028b2935dd5b7ddb">shark::EnergyStoringTemperedMarkovChain&lt; Operator &gt;::step()</a>.</p>

</div>
</div>
<a id="a25ad87baa9a3500ea7b3af9a4effc933" name="a25ad87baa9a3500ea7b3af9a4effc933"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a25ad87baa9a3500ea7b3af9a4effc933">&#9670;&#160;</a></span>energyFromHiddenInput()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_r_b_m.html">RBM</a> &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">RealVector <a class="el" href="structshark_1_1_energy.html">shark::Energy</a>&lt; <a class="el" href="classshark_1_1_r_b_m.html">RBM</a> &gt;::energyFromHiddenInput </td>
          <td>(</td>
          <td class="paramtype">RealMatrix const &amp;&#160;</td>
          <td class="paramname"><em>hiddenInput</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">RealMatrix const &amp;&#160;</td>
          <td class="paramname"><em>hidden</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">RealMatrix const &amp;&#160;</td>
          <td class="paramname"><em>visible</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Optimization of the calculation of the energy, when the input of the hidden units is already available. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">hiddenInput</td><td>the vector of inputs of the hidden neurons </td></tr>
    <tr><td class="paramname">hidden</td><td>the states of the hidden neurons </td></tr>
    <tr><td class="paramname">visible</td><td>the states of the visible neurons </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the value of the energy function </dd></dl>

<p class="definition">Definition at line <a class="el" href="_energy_8h_source.html#l00192">192</a> of file <a class="el" href="_energy_8h_source.html">Energy.h</a>.</p>

<p class="reference">References <a class="el" href="namespaceshark.html#af2ab10364feb8a631e0866dcf2f1a4ad">shark::batchSize()</a>.</p>

<p class="reference">Referenced by <a class="el" href="structshark_1_1_energy.html#aa07edf12f92820285d1b51495cdafb35">shark::Energy&lt; RBM &gt;::energy()</a>.</p>

</div>
</div>
<a id="a9f124cd4e0a4efa781ab34ab246fca81" name="a9f124cd4e0a4efa781ab34ab246fca81"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9f124cd4e0a4efa781ab34ab246fca81">&#9670;&#160;</a></span>energyFromVisibleInput()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_r_b_m.html">RBM</a> &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">RealVector <a class="el" href="structshark_1_1_energy.html">shark::Energy</a>&lt; <a class="el" href="classshark_1_1_r_b_m.html">RBM</a> &gt;::energyFromVisibleInput </td>
          <td>(</td>
          <td class="paramtype">RealMatrix const &amp;&#160;</td>
          <td class="paramname"><em>visibleInput</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">RealMatrix const &amp;&#160;</td>
          <td class="paramname"><em>hidden</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">RealMatrix const &amp;&#160;</td>
          <td class="paramname"><em>visible</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Optimization of the calculation of the energy, when the input of the visible units is already available. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">visibleInput</td><td>the vector of inputs of the visible neurons </td></tr>
    <tr><td class="paramname">hidden</td><td>the states of the hidden neurons </td></tr>
    <tr><td class="paramname">visible</td><td>the states of the visible neurons </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the value of the energy function </dd></dl>

<p class="definition">Definition at line <a class="el" href="_energy_8h_source.html#l00214">214</a> of file <a class="el" href="_energy_8h_source.html">Energy.h</a>.</p>

<p class="reference">References <a class="el" href="namespaceshark.html#af2ab10364feb8a631e0866dcf2f1a4ad">shark::batchSize()</a>.</p>

</div>
</div>
<a id="a751c81c6de87a9d563d36db38edccb92" name="a751c81c6de87a9d563d36db38edccb92"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a751c81c6de87a9d563d36db38edccb92">&#9670;&#160;</a></span>inputHidden()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_r_b_m.html">RBM</a> &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="structshark_1_1_energy.html">shark::Energy</a>&lt; <a class="el" href="classshark_1_1_r_b_m.html">RBM</a> &gt;::inputHidden </td>
          <td>(</td>
          <td class="paramtype">RealMatrix &amp;&#160;</td>
          <td class="paramname"><em>inputs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">RealMatrix const &amp;&#160;</td>
          <td class="paramname"><em>visibleStates</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Calculates the input of the hidden neurons given the state of the visible in a batch-vise fassion. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inputs</td><td>the batch of vectors the input of the hidden neurons is stored in </td></tr>
    <tr><td class="paramname">visibleStates</td><td>the batch of states of the visible neurons@ </td></tr>
  </table>
  </dd>
</dl>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000002">Todo:</a></b></dt><dd>Remove this and replace fully by the rbm method if possible </dd></dl>

<p class="definition">Definition at line <a class="el" href="_energy_8h_source.html#l00090">90</a> of file <a class="el" href="_energy_8h_source.html">Energy.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_r_b_m.html#a87ff1500124f108b836beebc4ee0eeb4">shark::RBM&lt; VisibleLayerT, HiddenLayerT, randomT &gt;::inputHidden()</a>.</p>

<p class="reference">Referenced by <a class="el" href="structshark_1_1_energy.html#aa07edf12f92820285d1b51495cdafb35">shark::Energy&lt; RBM &gt;::energy()</a>, and <a class="el" href="structshark_1_1_energy.html#a7c5d47f64f1839574b55545cebdbea78">shark::Energy&lt; RBM &gt;::logUnnormalizedProbabilityVisible()</a>.</p>

</div>
</div>
<a id="acf73968e06c43cedaf8fede5b2bf7782" name="acf73968e06c43cedaf8fede5b2bf7782"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acf73968e06c43cedaf8fede5b2bf7782">&#9670;&#160;</a></span>inputVisible()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_r_b_m.html">RBM</a> &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="structshark_1_1_energy.html">shark::Energy</a>&lt; <a class="el" href="classshark_1_1_r_b_m.html">RBM</a> &gt;::inputVisible </td>
          <td>(</td>
          <td class="paramtype">RealMatrix &amp;&#160;</td>
          <td class="paramname"><em>inputs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">RealMatrix const &amp;&#160;</td>
          <td class="paramname"><em>hiddenStates</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Calculates the input of the visible neurons given the state of the hidden. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inputs</td><td>the vector the input of the visible neurons is stored in </td></tr>
    <tr><td class="paramname">hiddenStates</td><td>the state of the hidden neurons </td></tr>
  </table>
  </dd>
</dl>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000003">Todo:</a></b></dt><dd>Remove this and replace fully by the rbm method if possible </dd></dl>

<p class="definition">Definition at line <a class="el" href="_energy_8h_source.html#l00100">100</a> of file <a class="el" href="_energy_8h_source.html">Energy.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_r_b_m.html#ab6140a0df931943c1c26bc07065a5565">shark::RBM&lt; VisibleLayerT, HiddenLayerT, randomT &gt;::inputVisible()</a>.</p>

<p class="reference">Referenced by <a class="el" href="structshark_1_1_energy.html#a3e25296fca0f1f23803bbb1535ff8f96">shark::Energy&lt; RBM &gt;::logUnnormalizedProbabilityHidden()</a>, and <a class="el" href="classshark_1_1_energy_storing_tempered_markov_chain.html#a390d4deeed260f32028b2935dd5b7ddb">shark::EnergyStoringTemperedMarkovChain&lt; Operator &gt;::step()</a>.</p>

</div>
</div>
<a id="afa5365f469f52d0682d3820fb071fa1b" name="afa5365f469f52d0682d3820fb071fa1b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afa5365f469f52d0682d3820fb071fa1b">&#9670;&#160;</a></span>logUnnormalizedProbabilityHidden() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_r_b_m.html">RBM</a> &gt; </div>
<div class="memtemplate">
template&lt;class BetaVector &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">RealVector <a class="el" href="structshark_1_1_energy.html">shark::Energy</a>&lt; <a class="el" href="classshark_1_1_r_b_m.html">RBM</a> &gt;::logUnnormalizedProbabilityHidden </td>
          <td>(</td>
          <td class="paramtype">RealMatrix const &amp;&#160;</td>
          <td class="paramname"><em>hiddenState</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">RealMatrix const &amp;&#160;</td>
          <td class="paramname"><em>visibleInput</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BetaVector const &amp;&#160;</td>
          <td class="paramname"><em>beta</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Computes the logarithm of the unnormalized probability of each state of the hidden neurons in a batch by using the precomputed input/activation of the visible neurons. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">hiddenState</td><td>the batch of states of the hidden neurons </td></tr>
    <tr><td class="paramname">visibleInput</td><td>the batch of current inputs for he visible units given hiddenState </td></tr>
    <tr><td class="paramname">beta</td><td>the inverse temperature </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the unnormalized probability </dd></dl>

<p class="definition">Definition at line <a class="el" href="_energy_8h_source.html#l00112">112</a> of file <a class="el" href="_energy_8h_source.html">Energy.h</a>.</p>

<p class="reference">References <a class="el" href="namespaceshark.html#af2ab10364feb8a631e0866dcf2f1a4ad">shark::batchSize()</a>, and <a class="el" href="_exception_8h.html#a42a6a50e4d06c00d60fbca5333f40768">SIZE_CHECK</a>.</p>

<p class="reference">Referenced by <a class="el" href="structshark_1_1_energy.html#a3e25296fca0f1f23803bbb1535ff8f96">shark::Energy&lt; RBM &gt;::logUnnormalizedProbabilityHidden()</a>, and <a class="el" href="classshark_1_1_energy_storing_tempered_markov_chain.html#a390d4deeed260f32028b2935dd5b7ddb">shark::EnergyStoringTemperedMarkovChain&lt; Operator &gt;::step()</a>.</p>

</div>
</div>
<a id="a3e25296fca0f1f23803bbb1535ff8f96" name="a3e25296fca0f1f23803bbb1535ff8f96"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3e25296fca0f1f23803bbb1535ff8f96">&#9670;&#160;</a></span>logUnnormalizedProbabilityHidden() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_r_b_m.html">RBM</a> &gt; </div>
<div class="memtemplate">
template&lt;class BetaVector &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">RealVector <a class="el" href="structshark_1_1_energy.html">shark::Energy</a>&lt; <a class="el" href="classshark_1_1_r_b_m.html">RBM</a> &gt;::logUnnormalizedProbabilityHidden </td>
          <td>(</td>
          <td class="paramtype">RealMatrix const &amp;&#160;</td>
          <td class="paramname"><em>hiddenStates</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BetaVector const &amp;&#160;</td>
          <td class="paramname"><em>beta</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Computes the logarithm of the unnormalized probability of each state of the hidden neurons from a batch. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">hiddenStates</td><td>a batch of states of the hidden neurons </td></tr>
    <tr><td class="paramname">beta</td><td>the inverse temperature </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_energy_8h_source.html#l00179">179</a> of file <a class="el" href="_energy_8h_source.html">Energy.h</a>.</p>

<p class="reference">References <a class="el" href="structshark_1_1_energy.html#acf73968e06c43cedaf8fede5b2bf7782">shark::Energy&lt; RBM &gt;::inputVisible()</a>, <a class="el" href="structshark_1_1_energy.html#afa5365f469f52d0682d3820fb071fa1b">shark::Energy&lt; RBM &gt;::logUnnormalizedProbabilityHidden()</a>, and <a class="el" href="_exception_8h.html#a42a6a50e4d06c00d60fbca5333f40768">SIZE_CHECK</a>.</p>

</div>
</div>
<a id="a7d21da0cfe60fabb495a5fa0d75cce51" name="a7d21da0cfe60fabb495a5fa0d75cce51"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7d21da0cfe60fabb495a5fa0d75cce51">&#9670;&#160;</a></span>logUnnormalizedProbabilityVisible() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_r_b_m.html">RBM</a> &gt; </div>
<div class="memtemplate">
template&lt;class BetaVector &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">RealVector <a class="el" href="structshark_1_1_energy.html">shark::Energy</a>&lt; <a class="el" href="classshark_1_1_r_b_m.html">RBM</a> &gt;::logUnnormalizedProbabilityVisible </td>
          <td>(</td>
          <td class="paramtype">RealMatrix const &amp;&#160;</td>
          <td class="paramname"><em>visibleState</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">RealMatrix const &amp;&#160;</td>
          <td class="paramname"><em>hiddenInput</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BetaVector const &amp;&#160;</td>
          <td class="paramname"><em>beta</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Computes the logarithm of the unnormalized probability of each state of the visible neurons in a batch by using the precomputed input/activation of the hidden neurons. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">visibleState</td><td>the batch of states of the hidden neurons </td></tr>
    <tr><td class="paramname">hiddenInput</td><td>the batch of current inputs for he visible units given visibleState </td></tr>
    <tr><td class="paramname">beta</td><td>the inverse temperature </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the unnormalized probability </dd></dl>

<p class="definition">Definition at line <a class="el" href="_energy_8h_source.html#l00141">141</a> of file <a class="el" href="_energy_8h_source.html">Energy.h</a>.</p>

<p class="reference">References <a class="el" href="namespaceshark.html#af2ab10364feb8a631e0866dcf2f1a4ad">shark::batchSize()</a>, and <a class="el" href="_exception_8h.html#a42a6a50e4d06c00d60fbca5333f40768">SIZE_CHECK</a>.</p>

<p class="reference">Referenced by <a class="el" href="structshark_1_1_energy.html#a7c5d47f64f1839574b55545cebdbea78">shark::Energy&lt; RBM &gt;::logUnnormalizedProbabilityVisible()</a>.</p>

</div>
</div>
<a id="a7c5d47f64f1839574b55545cebdbea78" name="a7c5d47f64f1839574b55545cebdbea78"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7c5d47f64f1839574b55545cebdbea78">&#9670;&#160;</a></span>logUnnormalizedProbabilityVisible() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_r_b_m.html">RBM</a> &gt; </div>
<div class="memtemplate">
template&lt;class BetaVector &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">RealVector <a class="el" href="structshark_1_1_energy.html">shark::Energy</a>&lt; <a class="el" href="classshark_1_1_r_b_m.html">RBM</a> &gt;::logUnnormalizedProbabilityVisible </td>
          <td>(</td>
          <td class="paramtype">RealMatrix const &amp;&#160;</td>
          <td class="paramname"><em>visibleStates</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BetaVector const &amp;&#160;</td>
          <td class="paramname"><em>beta</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Computes the logarithm of the unnormalized probability for each state of the visible neurons from a batch. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">visibleStates</td><td>the batch of states of the hidden neurons </td></tr>
    <tr><td class="paramname">beta</td><td>the inverse temperature </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_energy_8h_source.html#l00166">166</a> of file <a class="el" href="_energy_8h_source.html">Energy.h</a>.</p>

<p class="reference">References <a class="el" href="structshark_1_1_energy.html#a751c81c6de87a9d563d36db38edccb92">shark::Energy&lt; RBM &gt;::inputHidden()</a>, <a class="el" href="structshark_1_1_energy.html#a7d21da0cfe60fabb495a5fa0d75cce51">shark::Energy&lt; RBM &gt;::logUnnormalizedProbabilityVisible()</a>, and <a class="el" href="_exception_8h.html#a42a6a50e4d06c00d60fbca5333f40768">SIZE_CHECK</a>.</p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>include/shark/Unsupervised/RBM/<a class="el" href="_energy_8h_source.html">Energy.h</a></li>
</ul>
</div><!-- contents -->
</div>
</body>
</html>
